package wanglei.weixin.tuisong.job;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import wanglei.weixin.tuisong.util.Pusher;

/**
 *@ClassName JobWorker
 *@Description TODO
 *@Author xiaowng
 *@Date 2022/8/26
 */
@Component
public class JobWorker {
    //要推送的用户openid
    private static String openId = "oT2qR6rKIpERDrmTxUqrBMYhMG8k";

    //cron表达式,每天早上九点半执行定时任务
    @Scheduled(cron = "0 30 9 * * ?")
    public void goodMorning(){
        Pusher.push(openId);
        System.out.println("推送成功");
    }
}
